<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>document2html: curlwrapper Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">document2html
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Documents to HTML converter</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('namespacecurlwrapper.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">curlwrapper Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Wrapper for cURL library.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa3d8308115782ec266848322d3ce9cea"><td class="memItemLeft" align="right" valign="top"><a id="aa3d8308115782ec266848322d3ce9cea"></a>
std::default_random_engine&#160;</td><td class="memItemRight" valign="bottom"><b>gen</b> (rd())</td></tr>
<tr class="separator:aa3d8308115782ec266848322d3ce9cea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1162bb7be8fe09a965a7a1bb0cdfbf39"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacecurlwrapper.html#a1162bb7be8fe09a965a7a1bb0cdfbf39">getRandomProxy</a> (const std::vector&lt; std::string &gt; &amp;proxyList)</td></tr>
<tr class="memdesc:a1162bb7be8fe09a965a7a1bb0cdfbf39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get random proxy.  <a href="#a1162bb7be8fe09a965a7a1bb0cdfbf39">More...</a><br /></td></tr>
<tr class="separator:a1162bb7be8fe09a965a7a1bb0cdfbf39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50f3677ad83d7880032bddbf3bc27539"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacecurlwrapper.html#a50f3677ad83d7880032bddbf3bc27539">curlCallbackFunc</a> (void *contents, size_t size, size_t nmemb, std::string *s)</td></tr>
<tr class="memdesc:a50f3677ad83d7880032bddbf3bc27539"><td class="mdescLeft">&#160;</td><td class="mdescRight">cURL callback function which allows save site content to <code>std::string</code>  <a href="#a50f3677ad83d7880032bddbf3bc27539">More...</a><br /></td></tr>
<tr class="separator:a50f3677ad83d7880032bddbf3bc27539"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6ecf5b2f117ccd38e9373d963c08774"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacecurlwrapper.html#aa6ecf5b2f117ccd38e9373d963c08774">getPageContent</a> (int &amp;code, const std::string &amp;link, long timeout=20, int attemptCount=1, int interval=0, const std::string &amp;userAgent=&quot;&quot;, const std::vector&lt; std::string &gt; &amp;headerList={}, const std::vector&lt; std::string &gt; &amp;cookieList={}, const std::vector&lt; std::string &gt; &amp;proxyList={})</td></tr>
<tr class="memdesc:aa6ecf5b2f117ccd38e9373d963c08774"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get site content.  <a href="#aa6ecf5b2f117ccd38e9373d963c08774">More...</a><br /></td></tr>
<tr class="separator:aa6ecf5b2f117ccd38e9373d963c08774"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9be8a703f474d8851f71d6c5116ff05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacecurlwrapper.html#ab9be8a703f474d8851f71d6c5116ff05">downloadFile</a> (const std::string &amp;link, const std::string &amp;path, long timeout=20, int attemptCount=1, int interval=0, const std::string &amp;userAgent=&quot;&quot;, const std::vector&lt; std::string &gt; &amp;headerList={}, const std::vector&lt; std::string &gt; &amp;cookieList={}, const std::vector&lt; std::string &gt; &amp;proxyList={})</td></tr>
<tr class="memdesc:ab9be8a703f474d8851f71d6c5116ff05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Download and save file.  <a href="#ab9be8a703f474d8851f71d6c5116ff05">More...</a><br /></td></tr>
<tr class="separator:ab9be8a703f474d8851f71d6c5116ff05"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a6a41482f52b105a2f72bf435ab5c22df"><td class="memItemLeft" align="right" valign="top"><a id="a6a41482f52b105a2f72bf435ab5c22df"></a>
std::random_device&#160;</td><td class="memItemRight" valign="bottom"><b>rd</b></td></tr>
<tr class="separator:a6a41482f52b105a2f72bf435ab5c22df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adfdbecb51cd70de090d5f1945d18d44d"><td class="memItemLeft" align="right" valign="top">const char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacecurlwrapper.html#adfdbecb51cd70de090d5f1945d18d44d">STATUS_OK</a> = 0</td></tr>
<tr class="separator:adfdbecb51cd70de090d5f1945d18d44d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Wrapper for cURL library. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a50f3677ad83d7880032bddbf3bc27539"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50f3677ad83d7880032bddbf3bc27539">&#9670;&nbsp;</a></span>curlCallbackFunc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t curlwrapper::curlCallbackFunc </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>contents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nmemb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>s</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>cURL callback function which allows save site content to <code>std::string</code> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">contents</td><td>Received content </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Received content size </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">chunk</td><td>Chunk size </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">str</td><td>Result string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Size of received data </dd></dl>
<dl class="section since"><dt>Since</dt><dd>1.0 </dd></dl>

</div>
</div>
<a id="ab9be8a703f474d8851f71d6c5116ff05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9be8a703f474d8851f71d6c5116ff05">&#9670;&nbsp;</a></span>downloadFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void curlwrapper::downloadFile </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>timeout</em> = <code>20</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>attemptCount</em> = <code>1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>interval</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>userAgent</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
          <td class="paramname"><em>headerList</em> = <code>{}</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
          <td class="paramname"><em>cookieList</em> = <code>{}</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
          <td class="paramname"><em>proxyList</em> = <code>{}</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Download and save file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">link</td><td>File link </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>File new path </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">timeout</td><td>Wait response for N sec </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">attemptCount</td><td>Request attempt count </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">interval</td><td>Interval between requests (sec) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">userAgent</td><td>User Agent </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">headerList</td><td>List of headers </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cookieList</td><td>List of cookies </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">proxyList</td><td>List of proxy servers </td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>1.1 </dd></dl>

</div>
</div>
<a id="aa6ecf5b2f117ccd38e9373d963c08774"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6ecf5b2f117ccd38e9373d963c08774">&#9670;&nbsp;</a></span>getPageContent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string curlwrapper::getPageContent </td>
          <td>(</td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>timeout</em> = <code>20</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>attemptCount</em> = <code>1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>interval</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>userAgent</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
          <td class="paramname"><em>headerList</em> = <code>{}</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
          <td class="paramname"><em>cookieList</em> = <code>{}</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
          <td class="paramname"><em>proxyList</em> = <code>{}</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get site content. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">code</td><td>Status code </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">link</td><td>Site link </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">timeout</td><td>Wait response for N sec </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">attemptCount</td><td>Request attempt count </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">interval</td><td>Interval between requests (sec) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">userAgent</td><td>User Agent </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">headerList</td><td>List of headers </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cookieList</td><td>List of cookies </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">proxyList</td><td>List of proxy servers </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Site content </dd></dl>
<dl class="section since"><dt>Since</dt><dd>1.0 </dd></dl>

</div>
</div>
<a id="a1162bb7be8fe09a965a7a1bb0cdfbf39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1162bb7be8fe09a965a7a1bb0cdfbf39">&#9670;&nbsp;</a></span>getRandomProxy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string curlwrapper::getRandomProxy </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
          <td class="paramname"><em>proxyList</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get random proxy. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">proxyList</td><td>List of proxy servers </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Proxy link </dd></dl>
<dl class="section since"><dt>Since</dt><dd>1.0 </dd></dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="adfdbecb51cd70de090d5f1945d18d44d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adfdbecb51cd70de090d5f1945d18d44d">&#9670;&nbsp;</a></span>STATUS_OK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char curlwrapper::STATUS_OK = 0</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>OK status code </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacecurlwrapper.html">curlwrapper</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
